// pages/basics/collect/collect.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    dataList: []
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },
  onShow() {
    let wList = wx.getStorageSync('wrong') || null;
    if(wList) {
      let ary = wList;
      let ary2 = [];
      for (let iterator of ary) {
        if (iterator.userId == wx.getStorageSync('userId')) {
          ary2 = iterator.content;
          this.setData({
            dataList: ary2
          });
        }
      }
    }
  },
  answerFn(e) {
    let item = JSON.stringify(e.currentTarget.dataset.item);
    wx.navigateTo({
      url: '/pages/doExercise/doExercise?item=' + item,
    });
  }
})